import java.util.Random;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Random;



public class main {

	public static void main(String[] args) {
		bubble_sort q = new bubble_sort();
		bubble_sort w = new bubble_sort();
		long time_start = 0;
		int max = 20000;
		System.out.printf("Bubble\n");
		for (int n = 5000; n <= max; n = n+1000){
			int[] array = new int[n];
			Random ran = new Random();
			for (int i = 0; i<n; i++)
			{
				array[i]=Math.abs(ran.nextInt(10000));
			}
			time_start = System.currentTimeMillis();
			q.Bubble_sort(array, n);
			System.out.printf("n = "+ n + " Time is " + (System.currentTimeMillis() - time_start)+ "\n");
		}
		System.out.printf("My Bubble\n");
		for (int n = 5000; n <= max; n = n+1000){
			int[] array = new int[n];
			Random ran = new Random();
			for (int i = 0; i<n; i++)
			{
				array[i]=Math.abs(ran.nextInt(10000));
			}
			time_start = System.currentTimeMillis();
			q.my_Bubble_sort(array, n);
			System.out.printf("my n = "+ n + " Time is " + (System.currentTimeMillis() - time_start)+ "\n");
		}
	}
}
		